import React, { useEffect } from 'react';
import { useDispatch, useSelector } from 'umi';
import Tables from '../../components/offtables';

function Sale(props: any) {
  const dispatch = useDispatch();
  useEffect(() => {
    list.length ? '' : dispatch({ type: 'commerce/getshopssale' });
  }, []);
  const list = useSelector((state: any) => {
    return state.commerce.shopssale;
  });
  return (
    <div>
      <Tables fatherType={'shopssale'} list={list}></Tables>
    </div>
  );
}

export default Sale;
